![]() |
HRename |
||||
Header: | Files.h | Carbon status: | Supported | |
Renames a file, directory, or volume.
OSErr HRename ( SInt16 vRefNum, SInt32 dirID, ConstStr255Param oldName, ConstStr255Param newName );
A volume reference number, a working directory reference number, or 0 for the default volume.
A directory ID.
An existing filename, directory name, or volume name.
The new filename, directory name, or volume name.
A result code.
Access paths currently in use aren’t affected by this function.
You cannot use HRename to change the directory in which a file resides. If you’re renaming a volume, make sure that both names end with a colon.
If a file ID reference exists for a file you are renaming, the file ID remains with the renamed file.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)